#Originally, this just contained information on the harmful plankton project, but now also contains information about the IOC Taxonomic Reference List of Toxic Plankton Algae

class AddHarmfulPlanktonInfo < ActiveRecord::Migration
  def self.up
    data_provider = DataProvider.create(
      :name => "HarmfulPlanktonProject",
      :logo => "",
      :home_url => "http://www.liv.ac.uk/hab/intro.htm",
      :copyright_notice => "This information copyright the Harmful Plankton Project, used with permission",
      :acknowledgement => "This data has been provided by the Harmful Plankton Project",
      :risk_disclaimer => "Not applicable"
    )
    another_data_provider = DataProvider.create(
      :name => "IOCRefList",
      :logo => "",
      :home_url => "http://www.bi.ku.dk/ioc/",
      :copyright_notice => "All IOC data products are freely available, on condition of proper referencing",
      :acknowledgement => "This data has been provided by the Intergovernmental Oceanographic Commission",
      :risk_disclaimer => "Not applicable"
    )
  end

  def self.down
    data_provider = DataProvider.find_by_name"HarmfulPlanktonProject"
    if(data_provider)
      data_provider.data_objects.each do |data_object|
        data_object.destroy
      end
      data_provider.destroy
    end
    another_data_provider = DataProvider.find_by_name"IOCRefList"
    if(another_data_provider)
      another_data_provider.data_objects.each do |data_object|
        data_object.destroy
      end
      another_data_provider.destroy
    end
  end
end
